package com.nwpu.main;

import java.rmi.Remote;
import java.rmi.RemoteException;
import java.util.Date;
import java.util.Scanner;

/**
 * IMethodSet
 *
 * @author 龙虹宇
 * @version 1.0
 * @date 2023/11/1
 */
public interface IMethodSet extends Remote {
    /**
     * 处理指令
     *
     * @throws RemoteException
     */
    String processInstruction(String instruction) throws RemoteException;

    /**
     * 注册
     *
     * @param username
     * @param password
     * @return
     * @throws RemoteException
     */
    String register(String username, String password) throws RemoteException;

    /**
     * 登录
     *
     * @param username
     * @param password
     * @return
     * @throws RemoteException
     */
    String login(String username, String password) throws RemoteException;

    /**
     * 添加会议
     *
     * @param username
     * @param password
     * @param otherUsername
     * @param start
     * @param end
     * @param title
     * @return
     * @throws RemoteException
     */
    String add(String username, String password, String otherUsername, String start, String end, String title) throws  RemoteException;
    String query(String username, String password, String start, String end) throws  RemoteException;
    String delete(String username, String password, int meetingId) throws  RemoteException;
    String clear(String username, String password) throws  RemoteException;

    /**
     * 关闭资源
     *
     * @throws RemoteException
     */
    void close() throws RemoteException;
}
